package com.inspectionwork.web.mapper.safetyknowledge;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.inspectionwork.model.safetyknowledge.SafetyKnowledge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: YangYu
 * @ClassName: SafetyKnowledgeMapper
 * @Date: Created in 11:04 2022/6/23
 * @Description: 安全知识
 */
@Mapper
public interface SafetyKnowledgeMapper extends BaseMapper<SafetyKnowledge> {

    /**
     * @Author YangYu
     * @Description 安全知识分页查询
     * @Date Created in 14:14 2022/6/23
     * @Param [page, jsonParam]
     */

    IPage<SafetyKnowledge> getSafetyKnowledgeListPage(IPage page, @Param("param") JSONObject jsonParam);

    /**
     * @Author YangYu
     * @Description 批量删除
     * @Date Created in 14:24 2021/3/15
     * @Param [array]
     */

    void batchDelete(String[]  array,String tableName);

    /**
     * @Author YangYu
     * @Description 批量更新文章状态
     * @Date Created in 11:53 2022/3/25
     * @Param [list]
     */

    void batchUpdate(List<SafetyKnowledge> list,String state,String time);
}
